﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Rendering;

public class Layer : MonoBehaviour
{
    private SortingGroup SortingGroup;
    // Start is called before the first frame update
    void Start()
    {
        SortingGroup = transform.GetComponent<SortingGroup>();
        SortingGroup.sortingOrder = (Mathf.RoundToInt(-(transform.position.y)));
    }

    
}
